package com.itheima.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface AccountDao {

    @Update("update user_account set amount = amount + #{amount} where userAccount = #{userAccount}")
    void inMoney(@Param("userAccount") String userAccount, @Param("amount") Double amount);

    @Update("update user_account set amount = amount - #{amount} where userAccount = #{userAccount}")
    void outMoney(@Param("userAccount") String userAccount, @Param("amount") Double amount);
}